package id.link.win.login.sample.login;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * Spnego sample
 *
 * @author: Foy Lian
 * Date: 8/1/2019
 * Time: 3:55 PM
 */
@Controller
@RequestMapping("/spnego/login")
public class SpnegoLoginController {

    @GetMapping
    public String spnegoLogin(HttpServletRequest request , Model model){
        model.addAttribute("me",request.getRemoteUser());
        return "login/spnego_login";
    }
}
